Skip to content

chore: remove async for upsert/delete/append in python#280

Merged
luoyuxia merged 1 commit intoapache:mainfrom
luoyuxia:fix-python-api
Feb 8, 2026
Merged

chore: remove async for upsert/delete/append in python#280
luoyuxia merged 1 commit intoapache:mainfrom
luoyuxia:fix-python-api

Conversation

@luoyuxia
Copy link
Contributor

@luoyuxia luoyuxia commented Feb 8, 2026

Purpose

Linked issue: close #xxx

Follow pr for #271

Brief change log

remove async and return WriteResultHandle in append/upsert/delete method in python binding

Tests

API and Format

Documentation

@luoyuxia
Copy link
Contributor Author

luoyuxia commented Feb 8, 2026

cc @fresh-borzoni I'm going to merge it. Free feel to add following pr if you find any comments.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Python type stubs to reflect the (now synchronous) queueing semantics for append/upsert/delete, aligning the Python binding API with the core changes described in PR #271.

Changes:

  • Make AppendWriter.append() synchronous and return a WriteResultHandle.
  • Make UpsertWriter.upsert() / UpsertWriter.delete() synchronous and return a WriteResultHandle.
  • Add a WriteResultHandle type stub with an async wait() method for per-record acknowledgment.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 314 to 316
Supported Types:
Currently supports primitive types only:
- Boolean, TinyInt, SmallInt, Int, BigInt (integers)
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppendWriter.write_arrow_batch is still typed as returning None in this stub, but the binding returns a WriteResultHandle (so callers can optionally await per-batch ack). Update the stub signature to return WriteResultHandle to match the actual API.

Copilot uses AI. Check for mistakes.
@fresh-borzoni
Copy link
Contributor

@luoyuxia Sure, sorry - I always forget about this file :)

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@fresh-borzoni fresh-borzoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@luoyuxia luoyuxia merged commit 6b86f17 into apache:main Feb 8, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants